?
Script de item/actions alguem com uma ideia que possa me ajudar com isso.
Por JackSena, 27 de jan. de 2025 em Scripts
Editado Abril 6 por Yomee
7 horas atrás, Yomee disse:
o forum aqui já foi muito bom, mas dificilmente tem suporte como antigamente. Procura ajuda pelo discord ou em outros forums... atualmente onde consigo tirar muitas duvidas é pelo "tibiadevs", um dos forums BRs que aparentam estar mais "ativo" ultimamente
tenta esse
Tentei aqui não pegou, continua sem mostrar a quantidade
1 minuto atrás, JackSena disse:Tentei aqui não pegou, continua sem mostrar a quantidade
![]()
mudei o getplayermaxhealth pra getgrature
-- Exhausted Settings --
local exhausted_seconds = 1 -- How many seconds mana fluid will be unavailible to use. --
local exhausted_storagevalue = 9894 -- Storage Value to store exhaust. It MUST be unused! --
-- Exhausted Settings END --
function onUse(cid, item, frompos, item2, topos)
min = (9*getCreatureMaxHealth(cid)/100 + getPlayerMagLevel(cid)*10)
max = (10*getCreatureMaxHealth(cid)/100 + getPlayerMagLevel(cid)*10)
if hasCondition(cid, CONDITION_EXHAUSTED) == TRUE then
doPlayerSendCancel(cid,"Você está silenciado, stunado ou tentando usar outras coisas ao mesmo tempo, espere acabar o efeito para usar este objeto novamente.")
return FALSE
end
if(os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue)) then
health = math.random(min,max)
doPlayerAddHealth(cid,health)
doSendAnimatedText(getPlayerPosition(cid), "Glup.. Glup..",TEXTCOLOR_ORANGE)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doSendMagicEffect(getCreaturePosition(cid), 12)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doPlayerSendCancel(cid,"Você não pode usar este objeto.")
end
return 1
end
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Em 28/01/2025 em 10:58, Yomee disse:
o forum aqui já foi muito bom, mas dificilmente tem suporte como antigamente. Procura ajuda pelo discord ou em outros forums... atualmente onde consigo tirar muitas duvidas é pelo "tibiadevs", um dos forums BRs que aparentam estar mais "ativo" ultimamente
tenta esse
Primeiramente, você não deve postar esse tipo de resposta. Pois, este tópico foi criado neste fórum, e com propósito de ajuda.
E além disso, você mencionou e divulgou uma plataforma e fórum concorrente, o que é contra as regras.
Leia as regras atentamente para evitar ser advertido ou banido.
Em 28/01/2025 em 17:59, JackSena disse:Tentei aqui não pegou, continua sem mostrar a quantidade
![]()
mudei o getplayermaxhealth pra getgrature
-- Exhausted Settings --
local exhausted_seconds = 1 -- How many seconds mana fluid will be unavailible to use. --
local exhausted_storagevalue = 9894 -- Storage Value to store exhaust. It MUST be unused! --
-- Exhausted Settings END --function onUse(cid, item, frompos, item2, topos)
min = (9*getCreatureMaxHealth(cid)/100 + getPlayerMagLevel(cid)*10)
max = (10*getCreatureMaxHealth(cid)/100 + getPlayerMagLevel(cid)*10)
if hasCondition(cid, CONDITION_EXHAUSTED) == TRUE then
doPlayerSendCancel(cid,"Você está silenciado, stunado ou tentando usar outras coisas ao mesmo tempo, espere acabar o efeito para usar este objeto novamente.")
return FALSE
end
if(os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue)) then
health = math.random(min,max)
doPlayerAddHealth(cid,health)
doSendAnimatedText(getPlayerPosition(cid), "Glup.. Glup..",TEXTCOLOR_ORANGE)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doSendMagicEffect(getCreaturePosition(cid), 12)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doPlayerSendCancel(cid,"Você não pode usar este objeto.")
end
return 1
end
Você quer que informe a quantidade por mensagem via console ou com texto animado em cima do player?



info
Grupo: Campones
Registrado: 15/02/18
Posts: 8
Reputação: 0
Gênero: Masculino
Eu queria colocar pra aparecer a quantidade que regenera, ao usar o item, alguem pode me ajuda com isso ? o script em questão é esse aqui.
-- Exhausted Settings --
local exhausted_seconds = 1 -- How many seconds mana fluid will be unavailible to use. --
local exhausted_storagevalue = 9894 -- Storage Value to store exhaust. It MUST be unused! --
-- Exhausted Settings END --
function onUse(cid, item, frompos, item2, topos)
min = (9*getPlayerMaxHealth(cid)/100 + getPlayerMagLevel(cid)*10)
max = (10*getPlayerMaxHealth(cid)/100 + getPlayerMagLevel(cid)*10)
if hasCondition(cid, CONDITION_EXHAUSTED) == TRUE then
doPlayerSendCancel(cid,"Você está silenciado, stunado ou tentando usar outras coisas ao mesmo tempo, espere acabar o efeito para usar este objeto novamente.")
return FALSE
end
if(os.time() >= getPlayerStorageValue(cid, exhausted_storagevalue)) then
health = math.random(min,max)
doPlayerAddHealth(cid,health)
doSendAnimatedText(getPlayerPosition(cid), "Glup.. Glup..",TEXTCOLOR_ORANGE)
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doSendMagicEffect(getCreaturePosition(cid), 12)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doPlayerSendCancel(cid,"Você não pode usar este objeto.")
end
return 1
end